Skip to content

Add metric for tracking S3 endpoint calls by RPC method#28

Closed
regexident wants to merge 3 commits intomainfrom
plat-330/s3-endpoint-metric
Closed

Add metric for tracking S3 endpoint calls by RPC method#28
regexident wants to merge 3 commits intomainfrom
plat-330/s3-endpoint-metric

Conversation

@regexident
Copy link
Copy Markdown
Contributor

No description provided.

src/telemetry.rs Outdated

// MARK: - Endpoint Calls

pub(crate) fn record_endpoint_call(method: &'static str) {
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This now only measures the total endpoint call count to the endpoints.

But we already use the http.server semantic convention! So we should use the http.client convention here too!

https://opentelemetry.io/docs/specs/semconv/http/http-metrics/#http-client

rpc.method is then just an additional attribute (we add the S3 semantic to the http client semantic). I of course reason that the S3 client uses the http protocol.

@AlexanderKlump AlexanderKlump force-pushed the plat-330/s3-endpoint-metric branch from a835ced to fa72cab Compare March 16, 2026 09:04
@AlexanderKlump AlexanderKlump force-pushed the plat-330/s3-endpoint-metric branch from ac56bcf to 81df8bc Compare March 16, 2026 13:05
@AlexanderKlump AlexanderKlump force-pushed the plat-330/s3-endpoint-metric branch from 81df8bc to dc08c79 Compare March 16, 2026 13:10
#[async_trait::async_trait]
impl S3Access for TelemetryAccess {
async fn check(&self, cx: &mut S3AccessContext<'_>) -> S3Result<()> {
// to use this check to record telemetry data is an abuse of the S3Access trait, but we use it here to have a single location where we can record the requested operations
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Die alternative wäre ein decorator für den S3 Trait, oder? bedeutet man müsste alle methoden wrappen.

@regexident regexident closed this Mar 17, 2026
@regexident
Copy link
Copy Markdown
Contributor Author

Closed in favor of #34

@AlexanderKlump AlexanderKlump deleted the plat-330/s3-endpoint-metric branch March 18, 2026 10:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants